﻿using ServiceTable.Tool;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RimeLoRaTool.LoraServer
{
    interface ILoraServerIOPiper
    {
        ValidateResult Login(string username, string password);
        List<OrganizationInfo> GetOrganizationList(int limit, int offset);
        List<NetworkServer> GetNetworkServerList(int limit, int offset);
        List<ServiceProfile> GetServiceProfileList(int limit, int offset, int organizationID);
        List<GatewayProfile> GetGatewayProfileList(int limit, int offset, int networkServerID);
        List<ApplicationInfo> GetApplicationList(int limit, int offset, int organizationID);
        List<DeviceProfile> GetDeviceProfileList(int limit, int offset, int organizationID);
        DeviceProfile GetDeviceProfile(string deviceProfileID);
        int GetGatewayCnt(int organizationID);
        int GetDeviceCnt(int applicationID);

        // 以下为添加
        ValidateResult AddNetworkServer(string name, string server);
        ValidateResult AddServiceProfile(string name, int networkServerID, bool addGWMetaData, int organizationID);
        ValidateResult AddGatewayProfile(string name, int networkServerID, string channels);
        ValidateResult AddDeviceProfile(string name, int networkServerID, bool supportsJoin, bool supportsClassC, int organizationID);
        ValidateResult AddApplication(string name, int organizationID, string serviceProfileID, string description);
        ValidateResult AddGateway(string mac, string name, string description, string gatewayProfileID, int networkServerID, int organizationID);
        ValidateResult AddDevice(int applicationID, string name, string devEUI, string deviceProfileID, string description);
        ValidateResult AddDeviceKey(string devEUI, string appKey);
        ValidateResult UpdateDeviceActivation(string devEUI, string devAddr, string appSKey, string nwkSKey);
    }
}
